package ru.albina.planner.configuration;

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableCaching
@Configuration
public class CacheConfiguration {

    public static final String REFERENCE_CACHE_NAME = "referenceCache";
    public static final String REFERENCE_CACHE_NAME_2 = "referenceCache2";

    @Bean
    public CacheManager cacheManager() {
        return new ConcurrentMapCacheManager(REFERENCE_CACHE_NAME, REFERENCE_CACHE_NAME_2);
    }
}
